package com.nf;

import com.nf.entity.Car1;
import com.nf.entity.Student2;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Map;
import java.util.Properties;
import java.util.Set;

public class TestProperties {
    public static void main(String[] args){
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");

        Student2 s2 = (Student2)ac.getBean("student2C");

//        Properties遍历 丢set里面 然后遍历；
        Set<String> set = s2.getProperties().stringPropertyNames();
        for (String i: set) {
            System.out.println(s2.getProperties().getProperty(i));
        }

    }
}
